package com.meatball.controller

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
import com.meatball.data.dto.TestData
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.Parameter
import io.swagger.v3.oas.annotations.Parameters
import io.swagger.v3.oas.annotations.enums.ParameterIn
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * 测试控制层
 * @author 张翔宇
 * @since 2023年11月29日
 */
@RestController
@RequestMapping("/test")
class TestController {
    @ApiOperationSupport(author = "张三")
    @Operation(summary = "请求名称")
    @Parameters(
        Parameter(name = "name", description = "名称", `in` = ParameterIn.PATH, required = true, example = "张三")
    )
    @GetMapping("/{name}")
    fun test(@PathVariable name: String) {
        for (i in 30000..30100) {
            val a = "nat server protocol udp global 183.221.209.11 ${i} inside 192.168.90.100 ${i}"
            println(a)
        }
    }
//    fun test(@PathVariable name: String) = TestData(name = "张三")
}